/* eslint valid-jsdoc: "off" */

'use strict';

/**
 * @param {Egg.EggAppInfo} appInfo app info
 */
module.exports = appInfo => {
  /**
   * built-in config
   * @type {Egg.EggAppConfig}
   **/
  const config = exports = {};

  // use for cookie sign key, should change to your own and keep security
  config.keys = appInfo.name + '_1637324194324_5636';

  // add your middleware config here
  config.middleware = ['cook'];

  // add your user config here
  const userConfig = {
    // myAppName: 'egg',
  };
  
  config.view = {
    defaultViewEngine: 'nunjucks',
    mapping: {
      '.html': 'nunjucks',
    },
  };
  /* 配置安全机制 */
  config.security = {
    csrf: {
      enable: false,
    },
  };
  // 数据库连接
  config.mongodb = {
    app: true,
    agent: false,
    client:{
      hosts:"124.70.134.133:12021",
      db:"Student"
    }
  };
  // 文件上传
  config.multipart = {
    mode: 'file',
  };
  return {
    ...config,
    ...userConfig,
  };
};
